<template>
  <div id="wealthListCom">
    <div class="pos-list">
      <div class="dd-pos-title">
        <div>
          <img
            :src="icon"
            v-if="icon"
          />
          U利派 04
        </div>
        <div class="bg-blue">申请买入</div>
      </div>
      <Grid :border="false" :column-num="3">
        <GridItem>
          <div>{{ investment ? '投资金额' : '单笔限制' }}</div>
          <div class="blue data">{{investment?investment:'100 ~ 5000'}}</div>
        </GridItem>
        <GridItem>
          <div>日收益率</div>
          <div class="blue data">10% ~ 500%</div>
        </GridItem>
        <GridItem>
          <div>周期</div>
          <div class="blue data">2(天)</div>
        </GridItem>
        <GridItem v-if="startDate">
          <div>开始日期</div>
          <div class="blue data">{{startDate}}</div>
        </GridItem>
        <GridItem v-if="endDate">
          <div>结束日期</div>
          <div class="blue data">{{endDate}}</div>
        </GridItem>
        <GridItem v-if="Breach">
          <div>提前赎回违约金</div>
          <div class="blue data">{{Breach}}</div>
        </GridItem>
      </Grid>
      <div class="remark">{{ remark }}</div>
    </div>
  </div>
</template>

<script>
import { Grid, GridItem } from 'vant'

export default {
  components: {
    Grid,
    GridItem
  },
  props: {
    // 图标
    icon: {
      type: String,
      default: ''
    }, 
    //  单笔限制
    singleLimit: {
      type: Number || String,
      default: null
    },
    //  投资金额
    investment: {
      type: Number || String,
      default: null
    },
    //  日收益率
    theReturn: {
      type: Number || String,
      default: null
    },
    //  周期
    cycle: {
      type: Number || String,
      default: null
    },
    //  开始日期
    startDate: {
      type: Number || String,
      default: null
    },
    //  结束日期
    endDate: {
      type: Number || String,
      default: null
    },
    //  提前赎回违约金
    Breach: {
      type: Number || String,
      default: null
    },
    //  提示消息
    remark: {
      type: String,
      default: ''
    }
    .type

    
  }
}
</script>

<style lang="less" scoped>
#wealthListCom {
  /deep/.van-grid-item__content {
    padding-top: 0;
  }
  .pos-list {
    background: #fff;
    padding: 0 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    .dd-pos-title {
      display: flex;
      justify-content: space-between;
      margin-bottom: 10px;
      align-items: center;
      line-height: 50px;
      div:nth-child(1) {
        color: #000;
        font-size: 18px;
        font-weight: 600;
        display: flex;
        align-items: center;
        img{
          border-radius: 5px;
          margin-right: 10px;
          width: 40px;
          height: 40px;
        }
      }
      div:nth-child(2) {
        width: 76px;
        line-height: 30px;
        border-radius: 5px;
        text-align: center;
        color: #fff;
        font-size: 11px;
      }
    }
    .data {
      margin: 7px 0;
    }
  }
  .blue {
    color: #00abff;
  }
  .bg-blue {
    background: #00abff;
  }
  .remark {
    width: 100%;
    text-align: center;
    word-break: break-word;
    font-size: 14px;
    color: red;
    padding-bottom: 10px;
  }
}
</style>
